-- GENERATED SPELL FOR [Flesh Hunter] --


function spell0_15335(pUnit, Event) --@Consume,n/a--
pUnit:FullCastSpellOnTarget(25371,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15335', 15000, 1)
end

function spell1_15335(pUnit, Event) --@Poison Bolt,n/a--
pUnit:FullCastSpellOnTarget(25424,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15335', 12000, 1)
end

function spell2_15335(pUnit, Event) --@Thrash,Self--
pUnit:FullCastSpellOnTarget(3391,pUnit)
pUnit:RegisterEvent('Sorts_15335', 572, 1)
end

function Sorts_15335(pUnit, Event)
local choix_sorts_15335 = math.random(0, 2)
if choix_sorts_15335 == 0 then
pUnit:RegisterEvent('spell0_15335', 1, 1)
end
if choix_sorts_15335 == 1 then
pUnit:RegisterEvent('spell1_15335', 1, 1)
end
if choix_sorts_15335 == 2 then
pUnit:RegisterEvent('spell2_15335', 1, 1)
end
end

function mob15335_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15335', math.random(1500, 3000), 1)
end

function mob15335_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15335_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15335_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15335, 1, 'mob15335_Action')
RegisterUnitEvent(15335, 2, 'mob15335_Leave')
RegisterUnitEvent(15335, 3, 'mob15335_Kill')
RegisterUnitEvent(15335, 4, 'mob15335_Die')
